<template>
  <div class="work-template">
    <div class="template-list">
      <!-- 批记录类型或批记录搜索 Start -->
      <header>
        <a-input
          placeholder="回车搜索"
          v-model="templateSearch.keyWord"
          @keyup.enter.native="searchTemplate"
        />
        <a-icon type="plus" class="icon-class" @click="addworkType" />
      </header>
      <!-- 批记录类型或批记录搜索 End -->
      <div class="list-box">
        <!-- 批记录类型及批记录模板 Start -->
        <template-list-children
          :list="templateData"
          :currentInfo="currentTemplate"
          @presentData="presentTemplate"
          @addWorkFun="addWork"
          @editWorkTypeFun="editWorkType"
          @delWorkTypeFun="delWorkType"
          @editWorkFun="editWork"
          @delWorkFun="delWork"
          @switchItemFun="switchItem"
        ></template-list-children>
        <!-- 批记录类型及批记录模板 End -->
      </div>
    </div>
    <div class="template-table">
      <!-- 批记录项搜索 Start -->
      <header>
        <a-input-search
          placeholder="搜索"
          v-model="listName"
          @keyup.enter.native="searchTypeFun"
        />
        <div class="table-box-icon">
          <span class="icon-class-box" @click="templateShowFun"
            ><img src="@/assets/img/Icon/编辑.png" alt=""
          /></span>
        </div>
      </header>
      <!-- 批记录项搜索 End -->

      <!-- 批记录对应信息展示 Start -->
      <div class="table-title">
        <div class="title-left" v-if="currentTemplate">
          <span class="template-name"
            >{{ currentTemplate.JobGroupName || "/" }}({{
              currentTemplate.JobGroupNo
            }}
            - {{ currentTemplate.JobTempletVisionOut }})
            <span style="color: #16a951">{{
              currentTemplate.RatifyStatus ? "(已批准)" : ""
            }}</span>
          </span>
          <span class="template-icon">
            <img
              src="@/assets/svg/success.svg"
              alt=""
              v-if="currentTemplate.VerifyStatus" />
            <img v-else src="@/assets/svg/error.svg" alt=""
          /></span>
          <span class="template-version"
            >V{{ currentTemplate.JobTempletVisionIn }}</span
          >

          <general-button
            class="default-button"
            size="small"
            @operation="copyWork"
            :btnDisabled="!currentTemplate.JobGroupName"
            btnText="复制"
            btnPowerNum="8CECB950-234F-4B6A-81AF-3BB04DAE91B1"
          >
          </general-button>

          <general-button
            class="default-button"
            size="small"
            @operation="examineJobGroup"
            :btnDisabled="!currentTemplate.JobGroupName"
            :btnText="getText(currentTemplate.VerifyStatus)"
            btnPowerNum="3F12673B-ABBF-46BB-BF94-99225981988C"
          >
          </general-button>
          <general-button
            class="default-button"
            size="small"
            @operation="ratifyFun"
            :btnDisabled="
              !currentTemplate.VerifyStatus || currentTemplate.RatifyStatus
            "
            btnText="批准"
            btnPowerNum="E23F65EE-982D-47B4-A3E2-30489367BFA1"
          >
          </general-button>
          <general-button
            class="default-button"
            size="small"
            @operation="openPrint"
            :btnDisabled="!currentTemplate.JobGroupName"
            btnText="打印"
            btnPowerNum="3BF46B66-29B8-4D2A-8B2F-2F2AF111FBF4"
          >
          </general-button>
        </div>
      </div>
      <!-- 批记录对应信息展示 End -->

      <!-- 批记录表单展示 Start -->
      <div class="record-table">
        <div>
          <div
            class="batch-record"
            v-for="(item, index) in batchRecordList"
            :key="index"
          >
            <!-- 表单信息展示 Start -->
            <div class="batchRecord-title">
              <div style="display: flex; align-items: center">
                <span class="name">{{ item.JobTempletName }}</span>
                <span
                  ><a-tag
                    :color="
                      item.TableType == 1
                        ? '#50AF4B'
                        : item.TableType == 2
                        ? '#0982F5'
                        : '#846BE9'
                    "
                  >
                    {{
                      item.TableType == 1
                        ? "单例表单"
                        : item.TableType == 2
                        ? "聚合表单"
                        : "视图表单"
                    }}
                  </a-tag></span
                >
              </div>
              <div>
                <general-button
                  class="default-button flex-button"
                  style="margin-right: 10px"
                  size="small"
                  @operation="previewFun(item)"
                  :btnDisabled="
                    !currentTemplate.JobGroupName || item.itemList.length == 0
                  "
                  btnText="预览"
                  btnPowerNum="08FF94B1-B756-43A1-BEB5-68658103DE2E"
                >
                </general-button>
                <general-button
                  class="default-button flex-button"
                  size="small"
                  @operation="templateShowBillFun(item)"
                  :btnDisabled="
                    !currentTemplate.JobGroupName || item.itemList.length == 0
                  "
                  btnText="单项修改"
                  btnPowerNum="0D6287E6-81C9-4EEB-AECA-92DE7FC0684B"
                >
                </general-button>
              </div>
            </div>
            <!-- 表单信息展示 End -->
            <!-- 单例表单 Start -->
            <div
              class="batch-table"
              v-if="item.TableType == 1 && item.itemList.length > 0"
            >
              <batch-table
                :mateCurrentInfo="currentTemplate"
                :list="item.itemList"
                :item="item"
                :isTemplate="true"
                flag="1"
              ></batch-table>
            </div>
            <!-- 单例表单 End -->
            <!-- 聚合表单 Start -->
            <div
              class="two-batch-table"
              v-if="
                (item.TableType == 2 || item.TableType == 3) &&
                item.itemList.length > 0
              "
            >
              <div class="table-header">
                <div
                  class="header-box"
                  v-for="(d, didx) in item.titleList"
                  :key="didx"
                >
                  <div class="title-boxs" v-if="d.levelList">
                    <div class="name">{{ d.levelName }}</div>
                    <div class="info" v-if="d.levelList">
                      <div
                        v-for="(dchildrem, dchildremidx) in d.levelList"
                        :key="dchildremidx"
                      >
                        {{ dchildrem.levelName }}
                      </div>
                    </div>
                  </div>
                  <div class="title-box" v-if="!d.levelList">
                    {{ d.levelName }}
                  </div>
                </div>
              </div>
            </div>
            <!-- 聚合表单 End -->
          </div>
        </div>
      </div>
      <!-- 批记录表单展示 End -->
    </div>
    <!-- 操作批记录模板信息 Start -->
    <template-drawer
      :show.sync="templateShow"
      :currentInfo="currentTemplate"
      @upInfo="upInfoFun"
      :isBill="isBill"
      :billId="billId"
    ></template-drawer>
    <!-- 操作批记录模板信息 End -->
    <!-- 添加批记录 Start -->
    <work-modal
      :workShow.sync="workModalShow"
      :workEdit="workEdit"
      :workData="workInfo"
      :workCopy="workCopy"
      @updWorkFun="UpWorkType"
    ></work-modal>
    <!-- 添加批记录 End -->
    <!-- 添加批记录类型 Start -->
    <work-type-modal
      :workTypeShow.sync="workTypeModaShow"
      :workTypeEdit="workTypeEdit"
      :workTypeData="workTypeInfo"
      @UpTypeData="UpWorkType"
    ></work-type-modal>
    <!-- 添加批记录类型 End -->
    <!-- 预览 -->
    <preview-box
      :show.sync="showPreview"
      :mitem="previewItem"
      :list="previewList"
    ></preview-box>

    <print-drawer
      :show="isPrintShow"
      :list="printList"
      :mateCurrentInfo="currentTemplate"
      @updateShow="isPrintShow = false"
    ></print-drawer>
  </div>
</template>

<script>
import TemplateListChildren from "./children/template-list.vue"; //列表
import TableView from "@/components/Ant-Table/ant-table.vue"; //表格
import BatchColum from "./Colums/batchColums"; //表头数据
import TemplateDrawer from "./children/template-drawer.vue"; //添加弹窗
import WorkModal from "./children/work-modal.vue";
import WorkTypeModal from "./children/work-type-modal.vue";
import SingletonList from "./children/singleton-Info.vue";
import BatchTable from "@/views/batch-printing/children/batch-table-box.vue";
import PrintDrawer from "./children/print-drawer.vue";
import GeneralButton from "@/components/be-current-btn.vue";
import {
  getJobGroupTypeDtos,
  deleteJobGroupTypeDto,
  getJobGroupTypeDtosList,
} from "@/api/JobGroupType/index"; //工作集类型
import {
  getJobGroupDtos,
  deleteJobGroup,
  verifyJobGroup,
  oppositeVerifyJobGroup,
  ratifyJobGroup,
} from "@/api/JobGroup/index"; //工作集
import { getJobTemplets } from "@/api/JobTemplet/index";
import { getJobItems, getJobItemsGroup } from "@/api/JobItem";
import polymerizeTitle from "@/common/handle-title";
import previewBox from "./children/preview-modal.vue";
export default {
  name: "WorkTemplate",
  components: {
    TemplateListChildren,
    TableView,
    TemplateDrawer,
    WorkModal,
    WorkTypeModal,
    SingletonList,
    BatchTable,
    previewBox,
    PrintDrawer,
    GeneralButton,
  },
  data() {
    return {
      isPrintShow: false, //显示隐藏打印
      printList: [], //打印列表
      showPreview: false, //预览
      previewItem: {}, //预览工作集信息
      previewList: [], //预览工作集项
      workInfo: {
        JobGroupName: null, //工作集名称
        JobGroupNo: null, //工作集编码
        JobTempletVisionOut: null, //外部版本号
        JobGroupDesc: null, //工作集描述
        Remark: null, //备注
        CreateUserID: JSON.parse(localStorage.getItem("nbcUserInfo")).UserID,
      }, //工作集信息
      workTypeInfo: {
        JobGroupTypeName: null, //类型名称
        jobGroupTypeNo: null, //类型编码
        JobGroupTypeDesc: null, //类型描述
        JobGroupClass: null, //业务
        Remark: null, //备注
        CreateUserID: JSON.parse(localStorage.getItem("nbcUserInfo")).UserID,
      }, //添加修改工作集类型信息
      workModalShow: false, //工作集
      workEdit: false, //工作集是否为修改
      workCopy: false, //是否为复制
      workTypeModaShow: false, //工作集类型
      workTypeEdit: false, //工作集类型是否为修改
      templateSearch: {
        keyWord: null,
        pageRequestModel: {
          pageIndex: 1,
          pageSize: 30,
        },
      }, //工作集类型搜索参数

      singLetonTitleList: [
        { name: "序号", span: 1 },
        { name: "类型", span: 2 },
        { name: "名称", span: 2 },
        { name: "分组", span: 2 },
        { name: "描述", span: 2 },
        { name: "详细步骤", span: 3 },
        { name: "内容选项", span: 5 },
        { name: "默认值", span: 2 },
        { name: "必填", span: 1 },
        { name: "约束", span: 1 },
        { name: "高级设置", span: 2 },
        { name: "操作", span: 1 },
      ], //批记录表头
      templateData: [], //工作集类型列表
      templateDataNum: 0, //工作集类型总条数
      currentTemplate: {
        JobGroupName: null,
      }, //当前模板
      isBill: null, //是否单项修改
      billId: null, //单项id存储
      batchColumns: BatchColum, //表头数据
      templateShow: false, //进入编辑页
      batchRecordList: [], //表单内容列表
      listName: null, //表单搜索
      typeList: [
        "附件",
        "图片",
        "单选",
        "复核",
        "填空（数值）",
        "填空（字符）",
        "日期",
        "时间",
        "多选",
      ],
    };
  },

  methods: {
    //点击打印
    openPrint() {
      this.printList = this.batchRecordList;
      this.isPrintShow = true;
    },
    //获取审核按钮
    getText(value) {
      return value ? "反审核" : "审核";
    },
    //查询工作集项
    searchTypeFun() {
      this.batchRecordList = [];
      this.getJobTempletsFun();
    },
    //查询工作集类型
    searchTemplate() {
      this.templateData = [];
      this.getJobGroupTypeDtosFun();
    },
    //更新工作模板下的项
    upInfoFun() {
      this.getJobTempletsFun();
    },
    //获取工作模板
    async getJobTempletsFun() {
      if (!this.currentTemplate || !this.currentTemplate.JobGroupID) {
        return;
      }
      let res = await getJobTemplets({
        pageRequestModel: {
          pageIndex: 1,
          pageSize: 1000,
        },
        keyWord: this.listName,
        JobGroupID: this.currentTemplate.JobGroupID,
      });
      res.Data.Data.map((item, index) => {
        item.itemList = [];
        if (item.TableType == 2 || item.TableType == 3) {
          this.getJobItemsFun(item);
        } else {
          this.getOneJobItemsFun(item);
        }
      });
      res.Data.Data.sort((a, b) => a.JobTempletIndex - b.JobTempletIndex);
      this.batchRecordList = res.Data.Data;
    },
    //获取工作模板下的项 (聚合)
    async getJobItemsFun(item) {
      let itemRes = await getJobItems({
        pageRequestModel: {
          pageIndex: 1,
          pageSize: 1000,
        },
        JobTempletID: item.JobTempletID,
      });
      this.batchRecordList.map((itm, idx) => {
        if (item.JobTempletID == itm.JobTempletID) {
          itm.itemList = itemRes.Data.Data;
        }
        if (itm.TableType == 2 || itm.TableType == 3) {
          itm.titleList = polymerizeTitle.handleTitleList(itm.itemList);
        }
      });
    },
    //获取工作模板下的项 (单例)
    async getOneJobItemsFun(item) {
      let itemRes = await getJobItemsGroup({
        pageRequestModel: {
          pageIndex: 1,
          pageSize: 1000,
        },
        JobTempletID: item.JobTempletID,
      });
      let list = itemRes.Data.sort((a, b) => {
        return a.JobItemIndex - b.JobItemIndex;
      });
      list.map((item) => {
        item.JobGroup = item.JobGroup.split("。");
        item.JobRecordDetailList = item.JobRecordDetailList.sort((a, b) => {
          return a.JobItemIndex - b.JobItemIndex;
        });
      });
      this.batchRecordList.map((itm, idx) => {
        if (item.JobTempletID == itm.JobTempletID) {
          itm.itemList = list;
        }
      });
    },

    //审核批记录
    examineJobGroup() {
      let that = this;
      let { JobGroupStatus, JobGroupName, VerifyStatus } = this.currentTemplate;
      this.$confirm({
        title: `${VerifyStatus ? "反审核" : "审核"}`,
        content: `是否确认${
          VerifyStatus ? "反审核" : "审核"
        }工作集【${JobGroupName}】？`,
        async onOk() {
          if (VerifyStatus) {
            let res = await oppositeVerifyJobGroup(that.currentTemplate);
            res.Success
              ? that.$message.success("处理成功")
              : that.$message.error(res.Message);
          } else {
            let res = await verifyJobGroup(that.currentTemplate);
            res.Success
              ? that.$message.success("处理成功")
              : that.$message.error(res.Message);
          }

          that.UpWorkType();
        },
        onCancel() {},
      });
    },
    //批准批记录
    ratifyFun() {
      let that = this;
      let { JobGroupStatus, JobGroupName, VerifyStatus } = this.currentTemplate;
      this.$confirm({
        title: `批准`,
        content: `是否批准工作集【${JobGroupName}】？`,
        async onOk() {
          let res = await ratifyJobGroup(that.currentTemplate);
          res.Success
            ? that.$message.success("处理成功")
            : that.$message.error(res.Message);
          that.UpWorkType();
        },
        onCancel() {},
      });
    },
    //选中项回传
    presentTemplate(data) {
      this.currentTemplate = data;
      this.getJobTempletsFun();
    },
    //添加工作集类型
    addworkType() {
      if (!this.hasPermission("02AC9BF3-B699-4886-B1EF-F4A3E79816C7")) {
        return;
      }
      this.workTypeInfo = {
        JobGroupTypeName: null,
        JobGroupNo: null,
        JobGroupTypeDesc: null,
        JobGroupClass: null, //业务
        CreateUserID: JSON.parse(localStorage.getItem("nbcUserInfo")).UserID,
      }; //添加时清空添加信息
      this.workTypeEdit = false; //false为添加
      this.workTypeModaShow = true; //工作集类型显示
    },
    //添加工作集
    addWork(item) {
      this.workInfo = {
        JobGroupName: null, //工作集名称
        JobGroupNo: null, //工作集编码
        JobTempletVisionOut: null, //外部版本号
        JobGroupDesc: null, //工作集描述
        Remark: null, //备注
        CreateUserID: JSON.parse(localStorage.getItem("nbcUserInfo")).UserID,
        JobGroupTypeID: item.JobGroupTypeID,
        JobGroupTypeName: item.JobGroupTypeName,
      };
      this.workModalShow = true; //工作集显示
      this.workEdit = false; //工作集是否修改
      this.workCopy = false; //工作集是否为复制
    },
    //复制工作集
    copyWork() {
      this.workInfo = {
        ...JSON.parse(JSON.stringify(this.currentTemplate)),
      };
      this.workModalShow = true; //工作集显示
      this.workEdit = false; //工作集是否修改
      this.workCopy = true; //工作集是否为复制
    },
    //修改工作集类型
    editWorkType(item) {
      this.workTypeInfo = JSON.parse(JSON.stringify(item));
      this.workTypeEdit = true; //false为添加
      this.workTypeModaShow = true; //工作集类型显示
    },
    //删除工作集类型
    delWorkType(item) {
      let that = this;
      this.$confirm({
        title: "删除工作集类型",
        content: `是否确认删除工作集类型【${item.JobGroupTypeName}】？`,
        async onOk() {
          let res = await deleteJobGroupTypeDto(item);
          res.Success
            ? that.$message.success("删除成功")
            : that.$message.error(res.Message);
          that.UpWorkType();
        },
        onCancel() {},
      });
    },
    //修改工作集
    editWork(item) {
      this.workInfo = JSON.parse(JSON.stringify(item));
      this.workModalShow = true; //工作集显示
      this.workEdit = true; //工作集是否修改
      this.workCopy = false; //工作集是否为复制
    },

    //删除工作集
    delWork(item) {
      let _this = this;
      this.$confirm({
        title: "删除工作集类型",
        content: `是否确认删除工作集类型【${item.JobGroupName}】？`,
        async onOk() {
          let res = await deleteJobGroup(item);
          res.Success
            ? _this.$message.success("删除成功")
            : _this.$message.error(res.Message);
          _this.UpWorkType();
        },
        onCancel() {},
      });
    },
    //批量修改
    templateShowFun() {
      if (!this.hasPermission("0D6287E6-81C9-4EEB-AECA-92DE7FC0684B")) {
        return;
      }
      this.isBill = false;
      this.billId = null;
      if (this.currentTemplate.JobGroupName == null)
        return this.$message.error("暂无信息,无法操作");
      if (this.currentTemplate.VerifyStatus)
        return this.$message.error("当前模板已审批,无法操作");

      this.templateShow = true;
    },
    /* 查找非填写项 */
    checkType(list, itemName) {
      return (
        courses.filter(function (course) {
          return filtersArray.indexOf(course) > -1;
        }).length === filtersArray.length
      );
    },
    //预览
    previewFun(item) {
      this.previewItem = item;
      if (item.TableType == 1) {
        let list = [];
        item.itemList.map((ditm) => {
          ditm.JobRecordDetailList.map((jitem) => {
            if (this.typeList.some((sitem) => sitem == jitem.DataTypeName)) {
              list.push(jitem);
            }
          });
        });
        this.previewList = [list];
      } else {
        let list = item.itemList.filter((itm) =>
          this.typeList.some((sitem) => sitem == itm.DataTypeName)
        );
        this.previewList = [item.itemList];
      }
      this.showPreview = true;
    },
    //单项修改
    templateShowBillFun(item) {
      this.isBill = true;
      this.billId = item.JobTempletID;
      if (this.currentTemplate.JobGroupName == null)
        return this.$message.error("暂无信息,无法操作");
      if (this.currentTemplate.VerifyStatus)
        return this.$message.error("当前模板已审批,无法操作");
      this.templateShow = true;
    },
    //切换工作集类型显示隐藏
    async switchItem(item) {
      if (item.check) {
        let JobResult = await getJobGroupDtos({
          JobGroupTypeID: item.JobGroupTypeID,
          pageRequestModel: {
            pageIndex: 1,
            pageSize: 100,
          },
          keyWord: null,
        });
        this.templateData.map((ditem, index) => {
          if (ditem.JobGroupTypeID == item.JobGroupTypeID) {
            ditem.childrenList = JobResult.Data.Data;
          }
        });
      }
    },
    //获取工作集类型列表
    async getJobGroupTypeDtosFun() {
      let res = await getJobGroupTypeDtosList(this.templateSearch);
      let currentIdx = 0;
      this.templateDataNum = res.Data.TotalNumber;
      res.Data.Data.map(async (item, index) => {
        if (item.JobGroupList[0] && !this.currentTemplate.JobGroupID) {
          this.currentTemplate = item.JobGroupList[0];
          currentIdx = 0;
          this.getJobTempletsFun();
        } else {
          item.JobGroupList.map((itm) => {
            itm.JobGroupTypeName = item.JobGroupTypeName;
            if (itm.JobGroupID == this.currentTemplate.JobGroupID) {
              this.currentTemplate = itm;
              currentIdx = index;
            }
          });
          this.getJobTempletsFun();
        }
        if (index == currentIdx) {
          item.check = true;
        } else {
          item.check = false;
        }
      });
      this.templateData = this.templateData.concat(res.Data.Data);
      if (this.templateData.length == 0) {
        this.batchRecordList = [];
        this.currentTemplate = {};
      }
    },
    //更新工作集类型列表
    UpWorkType() {
      this.templateData = [];
      this.getJobGroupTypeDtosFun();
    },
  },
  watch: {},
  created() {},
  mounted() {
    this.$nextTick(() => {
      this.getJobGroupTypeDtosFun();
    });
  },
};
</script>

<style lang="less" scoped>
.work-template {
  position: relative;
  background-color: #ffffff;
  padding: 0.5rem 1rem;
  flex: 1;
  box-sizing: border-box;
  display: flex;
  overflow: hidden;

  .template-list {
    flex: 1;
    display: flex;
    flex-direction: column;

    header {
      display: flex;
      align-items: center;
      border-bottom: 2px solid #f0f2f5;
      padding-bottom: 0.625rem;

      i {
        margin-left: 0.625rem;
      }
    }

    .list-box {
      flex: 1;
      // height: calc(100% - 3.75rem);
      display: flex;
      overflow: hidden;
    }
  }

  .template-table {
    width: 0;
    margin-left: 1.25rem;
    flex: 5;
    display: flex;
    flex-direction: column;

    header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.625rem;

      .table-box-icon {
        margin-left: 1.25rem;
        display: flex;

        .icon-class-box {
          cursor: pointer;
          display: inline-block;
          height: 1.875rem;
          width: 1.875rem;

          &:nth-child(2) {
            margin: 0 0.625rem;
          }

          img {
            height: 100%;
            width: 100%;
          }
        }
      }
    }

    .table-title {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;

      .title-left {
        display: flex;
        align-items: center;

        .template-name {
          font-size: 20px;
          font-weight: 700;
        }

        .template-icon {
          height: 25px;
          width: 25px;
          margin: 0 10px;

          img {
            height: 100%;
            width: 100%;
          }
        }

        .template-version {
          font-size: 16px;
          opacity: 0.6;
        }

        .default-button {
          margin: 0 10px;
        }
      }
    }

    .record-table {
      background: #f1f5fb;
      height: calc(100% - 2.75rem);

      overflow-y: auto;
      flex: 2;
      display: flex;
      flex-direction: column;
      overflow-y: auto;

      .batch-record {
        margin-bottom: 0.625rem;
        background: #ffffff;
        margin: 0.625rem;
        padding: 0.625rem;
        border-radius: 0.3125rem;
        box-shadow: 1px 1px 2px #b6b6b6;

        .batchRecord-title {
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin-bottom: 0.625rem;
          margin-left: 0.625rem;

          .name {
            font-size: 1.25rem;
          }

          & span:nth-child(2) {
            margin: 0 0.625rem;
          }
        }

        .two-batch-table {
          width: 100%;
          overflow-x: auto;
          overflow-y: hidden;
        }

        .table-header {
          height: 3.3125rem;
          display: flex;
          margin-bottom: 0.9375rem;

          .header-box {
            height: 3.3125rem;
            display: flex;
            flex: 0 0 18.75rem;
            font-size: 0.875rem;
          }

          .title-box {
            text-align: center;
            line-height: 3.3125rem;
            flex: 1;
            border: 1px solid #b6b6b6;
          }

          .title-boxs {
            text-align: center;
            display: flex;
            flex-direction: column;
            flex: 1;
            border: 1px solid #b6b6b6;

            .name {
              border-bottom: 1px solid #b6b6b6;
            }

            .info {
              flex: 1;
              display: flex;

              div {
                white-space: nowrap;
                padding: 0 0.625rem;
                display: flex;
                justify-content: center;
                align-items: center;
                flex: 1;
                border-right: 1px solid #b6b6b6;
              }

              :last-child {
                border-right: none;
              }
            }
          }
        }
      }
    }
  }
}

// 隐藏表头的滚动条
/deep/ .ant-table-fixed-header .ant-table-scroll .ant-table-header {
  overflow: hidden !important;
  margin-bottom: 0 !important;
}

.success-text {
  color: #4b8e43;
}

.error-text {
  color: #7d2929 !important;
}
</style>
